dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlArray Structure / PgSqlArray Constructor / PgSqlArray Constructor(PgSqlType,Int32,Int32[])
The type of elements in the array.
The number of dimensions.
Limits for the dimentsions.
Example

In This Topic
    PgSqlArray Constructor(PgSqlType,Int32,Int32[])
    In This Topic
    Initializes a new instance of the PgSqlArray class with the specified element type and dimensions.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal elementType As PgSqlType, _
       ByVal rank As Integer, _
       ByVal ParamArray dimensions() As Integer _
    )
    public PgSqlArray( 
       PgSqlType elementType,
       int rank,
       params int[] dimensions
    )

    Parameters

    elementType
    The type of elements in the array.
    rank
    The number of dimensions.
    dimensions
    Limits for the dimentsions.
    Remarks
    This constructor allows creating any arrays with any rank and any number of elements in any dimension, filled with NULL values.
    Example

    This sample creates two-dimensional array with three sub-arrays, each has two elements. String representation of array that can be received with the ToString method will be the following:

    {{NULL,NULL},{NULL,NULL},{NULL,NULL}}
    
    PgSqlArray arr = new PgSqlArray(PgSqlType.Int, 2,3,2);
    Console.Write(arr);
    Dim arr As PgSqlArray = New PgSqlArray(PgSqlType.Int, 2, 3, 2)
    Console.Write(arr)
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also